package com.xyoto.community.enums;

/**
 * @author coderFu
 * @create 2021/9/30
 */
public enum PhoneEnum implements Code {

    /**
     * 手机验证码相关
     */
    PHONE_CODE_TIME_FAILED(1140,"手机号验证码一分钟时效未过"),
    MESSAGE_SEND_FAILED(1141,"短信发送失败"),
    NOT_SEND_MESSAGE_CODE(1142,"未发送短信验证码"),
    MESSAGE_CODE_FAILED(1143,"短信验证码错误"),
    PHONE_FORMAT_ERROR(1144,"手机号格式不正确"),
    PHONE_CODE_ALREADY_INVALID(1145,"验证码已失效");

    private int code;
    private String msg;

    PhoneEnum(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int code() {
        return this.code;
    }

    @Override
    public String msg() {
        return this.msg;
    }
}
